var bus = new Vue();

Vue.component("index-com", {
    template: `<div class="index-com">
                    <div class="user-img"><img :src="src"></div>
                    <span class="user-name">{{userName}}</span>
                </div>`,
    data() {
        return {
            src: "./4.png",
            userName: "这人谁呀"
        }
    }
})

Vue.component("index-btn-com", {
    template: `<div class="index-btn-com">
                    <span @click="startMat">开始答题</span>
                </div>`,
    methods: {
        startMat() {
            bus.$emit("setTemp", "answer-com", "answer-btn-com")
        }
    }
})
